﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="gridview.aspx.cs" Inherits="gridview" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .decrease.thumb
        {
            background-image: url('/images/decrease.png');
        }
        
        .decrease.thumb:hover
        {
            background-image: url('/images/decrease2.png');
        }
        
        .increase.thumb
        {
            background-image: url('/images/increase.png');
        }
        
        .increase.thumb:hover
        {
            background-image: url('/images/increase2.png');
        }
         
        .track.thumb
        {
            border: 1px solid #9a9a9a;
            background-image: url('/images/track.png');
            border-radius: 1px 1px 1px 1px;
            -webkit-border-radius: 1px 1px 1px 1px;
            -moz-border-radius: 1px 1px 1px 1px;
        }
        
        .track.thumb:hover
        {
            background-image: url('/images/track2.png');
        }
    </style>
    <script type="text/javascript" src="/scripts/NinJa.js"></script>
    <script type="text/javascript" src="/scripts/NinJaVisuals.js"></script>
    <script type="text/javascript" src="/scripts/NinJaControls.js"></script>
    <script type="text/javascript" src="/scripts/NinJaQuery.js"></script>
    <script type="text/javascript" src="/scripts/NinJaGridView.js"></script>
    <script type="text/javascript">
        function candle(name, color, price, holiday) {
            this.Name = name;
            this.Color = color;
            this.Price = price;
            this.Holiday = holiday;
        }

        var candles = [new candle("Sugar Cookie", Colors.Brown, 7, false),
                       new candle("Monkey Farts", Colors.Orange, 5, false),
                       new candle("Blueberry Cobbler", Colors.Blue, 7, false),
                       new candle("Apple Jack & Peel", Colors.Orange, 8, false),
                       new candle("Birthday Cake", Colors.Blue, 9, false),
                       new candle("Creme Brulee", Colors.Brown, 8, false),
                       new candle("Butt Naked", Colors.Pink, 10, false),
                       new candle("Love Spell", Colors.Red, 8, false),
                       new candle("French Vanilla", Colors.Whites, 5, false),
                       new candle("Pumpkin Spice", Colors.Brown, 8, false),
                       new candle("Christmas Memories", Colors.Red, 10, true),
                       new candle("Christmas Mulberry", Colors.Purple, 10, true),
                       new candle("Christmas Splendor", Colors.Red, 10, true),
                       new candle("Christmas Cheer", Colors.Red, 10, true),
                       new candle("Christmas Cookie", Colors.Brown, 8, true),
                       new candle("Fireside", Colors.Red, 9, true),
                       new candle("Egg Nogg", Colors.Yellow, 10, true),
                       new candle("Mistletoe Kisses", Colors.Green, 10, true),
                       new candle("Fresh Cut Christmas Tree", Colors.Green, 10, true),
                       new candle("Smell of Christmas", Colors.Red, 10, true),
                       new candle("Caramel Pecan Pie", Colors.Brown, 8, false),
                       new candle("White Peach & Hibiscus", Colors.Yellow, 8, false),
                       new candle("Vanilla Pumpkin Pie", Colors.Brown, 9, true),
                       new candle("Spicy Apples & Peaches", Colors.Green, 7, false),
                       new candle("Honeydew", Colors.Green, 5, false),
                       new candle("Lemon Buttercreme", Colors.Yellow, 6, false),
                       new candle("Cocktails on the Beach", Colors.Orange, 8, false),
                       new candle("Black Cherry", Colors.DarkRed, 9, false)];

        Page.OnLoad.Add(function () {
            $GridView("candles").OnRowBound.Add(function (e) {
                e.Row.BackgroundColor(e.Item.Color);
            });
            $GridView("candles").Bind(candles);
        });

        var holidayMap = {
            "true": "/images/holiday.png"
        };
    </script>
</head>
<body>
    <table class="gridview" id="candles" width="400">
        <thead>
            <tr>
                <th width="18" property="Holiday" columntype="image" map="holidayMap"></th>
                <th property="Name">Name</th>
                <th property="Price" width="50">Price</th>
            </tr>
        </thead>
    </table>
</body>
</html>
